<template>
<div class="panel">
    <div class="panel-body">
        <div class="list-group">
            <div class="list-item">
                <div class="row">
                    <div class="title">创建人</div>
                    <div class="value">{{ audit.creator.realname }}</div>
                </div>
            </div>
            <div class="list-item">
                <div class="row">
                    <div class="title">创建时间</div>
                    <div class="value">{{ audit.create_time }}</div>
                </div>
            </div>
            <div class="list-item">
                <div class="row">
                    <div class="title">当前审核人</div>
                    <div class="value">{{ flow.auditor.realname }}</div>
                </div>
            </div>
            <div class="list-item">
                <div class="row">
                    <div class="title">审核结果</div>
                    <div class="value">{{ audit.audit_status }}</div>
                </div>
            </div>
            <div class="list-item">
                <div class="row">
                    <div class="title">订单信息</div>
                    <div class="value">
                        <el-button type="primary" size="mini" @click="showOrderDetail">查看</el-button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <orderDetailInner ref="orderDetailRef"></orderDetailInner>
</div>
</template>

<script>
export default {
    name: "AuditHead",
    components: {
        orderDetailInner: () => import('@/views/order/detail/index')
    },
    props: {
        flow: {
            type: Object,
            default: function () {
                return {
                    auditor: {
                        id: '',
                        realname: '',
                    }
                }
            }
        },
        audit: {
            type: Object,
            default: function () {
                return {
                    creator: {
                        id: '',
                        realname: '',
                    },
                    tag: {
                        id: '',
                        title: '',
                    }
                }
            }
        }
    },
    data() {
        return {

        };
    },
    methods: {
        showOrderDetail() {
            this.$nextTick(() => {
                // console.log(this.$refs);
                this.$refs['orderDetailRef'].showDrawer(this.audit.master_id);
            })
        }
    }
}
</script>
